﻿namespace B.S.ReportEvent.ErrorCode
{
    /// <summary>
    /// 分页帮助类
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class PagingResult<T>where T : class
    {
        /// <summary>
        /// 总记录数
        /// </summary>
        public int TotalCount { get; set; }
        
        /// <summary>
        /// 总页数
        /// </summary>
        public int TotalPage { get; set; }
        
        /// <summary>
        /// 当前页数据
        /// </summary>
        public IList<T> Data { get; set; }
        
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="totalCount"></param>
        /// <param name="totalPage"></param>
        /// <param name="data"></param>
        public PagingResult(int totalCount, int totalPage, IList<T> data)
        {
            TotalCount = totalCount;
            TotalPage = totalPage;
            Data = data;
        }
    }
}
